package org.example.blogserver.blog.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.blogpojo.Dto.ArticleDto;
import org.example.blogpojo.blog.domain.Article;
import org.example.blogpojo.blog.query.ArticleQuery;
import org.example.blogpojo.blog.vo.ArticleTypeVo;
import org.example.blogpojo.blog.vo.GdVo;

import java.util.List;

@Mapper
public interface ArticleMapper {
    //@Select("select * from tb_article")
    List<Article> getAllArticle();

    @Select("select * from tb_article where id=#{id}")
    Article getArticleById(Long id);

    List<Article> queryPage(ArticleQuery articleQuery);

    void insertArticle(Article article);

    void updateArticle(Article article);

    void deleteArticle(Long id);

    void deleteArticleByIds(Long[] ids);

    Article getByFileName(String fileName);

    List<GdVo> getGd();

    List<Article> getRa(Article article);

    List<ArticleDto> getBlogGdList(String time);
}
